/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface WecharCusPriceLog extends BasicModel<WecharCusPriceLog> {
  ctype?: string; // 操作类型
  cusCode?: string; // 客户编码
  invCode?: string; // 存货编码
  oldPrice?: number; // 调整前单价
  newPrice?: number; // 调整后单价
  createByName?: string; // 操作员
}

export const wecharCusPriceLogList = (params?: WecharCusPriceLog | any) =>
  defHttp.get<WecharCusPriceLog>({ url: adminPath + '/setting/log/wecharCusPriceLog/list', params });

export const wecharCusPriceLogListData = (params?: WecharCusPriceLog | any) =>
  defHttp.post<Page<WecharCusPriceLog>>({ url: adminPath + '/setting/log/wecharCusPriceLog/listData', params });

export const wecharCusPriceLogForm = (params?: WecharCusPriceLog | any) =>
  defHttp.get<WecharCusPriceLog>({ url: adminPath + '/setting/log/wecharCusPriceLog/form', params });

export const wecharCusPriceLogSave = (params?: any, data?: WecharCusPriceLog | any) =>
  defHttp.postJson<WecharCusPriceLog>({ url: adminPath + '/setting/log/wecharCusPriceLog/save', params, data });

export const wecharCusPriceLogDelete = (params?: WecharCusPriceLog | any) =>
  defHttp.get<WecharCusPriceLog>({ url: adminPath + '/setting/log/wecharCusPriceLog/delete', params });
